package com.github_Dididipapa.shortlink.project.common.exception;


import com.github_Dididipapa.shortlink.project.common.enums.BaseErrorCode;
import com.github_Dididipapa.shortlink.project.common.enums.interface_.IErrorCode;

/**
 * @description: 客户端异常
 * @author: dididi_papa
 * @email: mitis1624087624@gmail.com
 * @date: 2025/09/06  15:16
 */


public class ClientException extends AbstractException {

    public ClientException(IErrorCode errorCode) {
        this(null, null, errorCode);
    }

    public ClientException(String message) {
        this(message, null, BaseErrorCode.CLIENT_ERROR);
    }

    public ClientException(String message, IErrorCode errorCode) {
        this(message, null, errorCode);
    }

    public ClientException(String message, Throwable throwable, IErrorCode errorCode) {
        super(message, throwable, errorCode);
    }

    @Override
    public String toString() {
        return "ClientException{" +
                "code='" + errorCode + "'," +
                "message='" + errorMessage + "'" +
                '}';
    }
}

